<?php

if(!defined('ADMIN')){
	exit('Access Denied');
}

if(isset($_GET["id"])){ $_POST['ids']=$_GET["id"];}

$id_arr=$_POST['ids'];

if(!empty($id_arr)){
    if(!is_array($id_arr)){
        $id_arr1[]=$id_arr;
    }else{
        $id_arr1=$id_arr;
    }
    foreach($id_arr1 as $id){
        $adid=$ezhand->select("adv","spaceid","id=".$id);
        if($adid>0){
        $uinfo =array ('f' => 'items','e' => '-','v' =>1);
        $ezhand->update("advtype",$uinfo,'id="'.$adid.'"');
        }
                    
    }    
    
    $re=$ezhand->delete_id_in(implode(",",$id_arr1),"adv");

}
if($re==1){
    jumpajax('200','删除完成','');
}
else{
    jumpajax('300','删除错误','');
}
?>